<script type="text/javascript" src="<?php echo URL::base()?>js/coupon.js"></script>
<div id="dialog-form-coupon" title="<?php echo $current_tab["display_name"];?>"></div>
<div id="supplier-contain" class="ui-widget">

<table id="supplier" class="ui-widget ui-widget-content">
	<thead>
		<tr class="ui-widget-header ">
			<th><input type="checkbox" onclick="changeSelectAll(this,'checkKey');"></th>
			<th>组别</th>
			<th>小图片</th>
			<th>大图片</th>
			<th>大图高度</th>
			<th>大图宽度</th>
			<th>显示顺序</th>
			<th>备注</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
	<?php
	foreach ($result_coupon as $item){
		echo '<tr><td><input type="checkbox" class="checkKey" key="'.$item->id.'"/></td>';
		echo '<td>'.$item->group.'</td>';
		echo '<td>';
		if(!empty($item->smallpicture)){
			echo '<a target="_blank" href="'.URL::domain().COUPON_IMG_PATH.$item->smallpicture.'"><img src="'.URL::domain().COUPON_IMG_PATH.$item->smallpicture.'" width="100ps" /></a></td>';
		}
		echo '<td>';
		if(!empty($item->largepicture)){
			echo '<a target="_blank" href="'.URL::domain().COUPON_IMG_PATH.$item->largepicture.'"><img src="'.URL::domain().COUPON_IMG_PATH.$item->largepicture.'" width="100ps" /></a></td>';
		}
		echo '<td>'.$item->height.'</td>';
		echo '<td>'.$item->width.'</td>';
		echo '<td>'.$item->sort.'</td>';
		echo '<td>'.$item->desc.'</td>';
		echo '<td><button class="editCouponBtn" couponid="'.$item->id.'">修改</button>&nbsp;';
		echo '<button class="delCouponBtn" couponid="'.$item->id.'">删除</button></td>';
	}?>
	</tbody>
</table>
<div class="page clear"><?php echo $page_links;?></div>
<button id="create-coupon">添加优惠券</button>
<button id="edit-coupon">修改优惠券</button>
<button id="delete-coupon">删除选中优惠券</button>
</div>
